{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "jupyter nbconvert 换房收益.ipynb --to slides --post serve"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 离婚财产分割"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.10189090085999997\n",
      "sum 0.13222690810319998\n",
      "0.07528884299999998\n",
      "sum 0.1412615692632\n",
      "0.04945079999999999\n",
      "sum 0.1471956652632\n",
      "0.02436\n",
      "sum 0.15011886526319998\n"
     ]
    }
   ],
   "source": [
    "估值=300 #万元\n",
    "#男方， 获得 \n",
    "男方比例=0.12\n",
    "分期年=5\n",
    "年利率=1.015\n",
    "sum=0\n",
    "for 已过年 in range(1,分期年):\n",
    "   \n",
    "    每年付本金=男方比例/分期年\n",
    "    \n",
    "    未付=每年付本金*(分期年-已过年)\n",
    "   \n",
    "    利息=未付*pow(年利率,分期年-已过年)\n",
    "    print(利息)\n",
    "    sum+=利息\n",
    "    print( \"sum\",sum*男方比例+男方比例)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt \n",
    "plt.rcParams['font.sans-serif']=['SimHei'] #指定默认字体 SimHei为黑体"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "#%home\n",
    "T=48\n",
    "x=np.arange(0,T,1) #月每月计算\n",
    "贷款本金=50000\n",
    "利率=0.007\n",
    "贷款总额=贷款本金*利率\n",
    "房租=4400\n",
    "出租=3500\n",
    "T贷款起=0;T贷款止=6;ld=T贷款=-T贷款起+T贷款止\n",
    "T租房起=0;T租房止=T;lz=T租房=-T租房起+T租房止\n",
    "T出租起=3;T出租止=T;lc=T出租=-T出租起+T出租止\n",
    "\n",
    "T贷款=np.pad(np.arange(ld),(T贷款起,T-ld-T贷款起),\"maximum\")  #月\n",
    "T租房=np.pad(np.arange(lz),(T租房起,T-lz-T租房起),\"constant\")\n",
    "T出租=np.pad(np.arange(lc),(T出租起,T-lc-T出租起),\"constant\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x14c851f0c18>]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAEHCAYAAACTC1DDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3WlwXNd55vH/i30jlgYa3EQSABfAsqiFAsFFG6ixnUhylnFlHNfEjmuSlDyplFOpLDN2xVnGZSceT5IvqdFkNFGcVCVORs5iR6bjKBoRFCVTokhJ1gqQFHeKFBoESQAksfY7H+5li6ZEskng9kV3P78qFBunm+j33gLw4Jxzz7nm7oiIiMy1krgLEBGRwqSAERGRSChgREQkEgoYERGJhAJGREQioYAREZFIKGBERCQSChgREYmEAkZERCJRFncBcWppafG2tra4yxARySt79uwZcvfktV5X1AHT1tbG7t274y5DRCSvmNnhbF6nITIREYmEAkZERCKhgBERkUgoYEREJBIKGBERiYQCRkREIlFwAWNmj5nZTjP7Uty1iIgUs4IKGDP7BFDq7puADjNbHcX7/N8Xj/DlJ96M4kuLiBSMggoYoBd4PHz8JHD35S8ws4fNbLeZ7U6lUjf0JvsHx/jrFw4zPjVzw4WKiBS6QguYWuB4+HgYWHj5C9z9UXfvdvfuZPKaOx18oA3tzUxOp/nh0TM3XqmISIErtIAZA6rDx3VEdHzr2xKYwa6Dw1F8eRGRglBoAbOH94bFb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2HRnQszSwB/CvwCRXj8AB74FeBVYDPFdQ6+ADzi7mfCz4vyeyBbOhnXbw/vdYNvAw7FV0rsiupchH+9fgv4orsfpsiOH8DM/quZ/Xz4aSPwNYrrHHwE+BUz6wNuB36C4jr+66KFltfJzOqBHcD/Ax4ANl42bFTwzKzP3XvNbAXwPeApgr9kN7r7TLzVRcfMfhn4A+CHYdM3gF+niL4Xwgs9HgcqgdeBLxLMvxXNObgoDJmfpMh/H1yNAuYGhD9kHwWecfeTcdcTJzNbQvAX3L8W4w+Wvhd0Dor9+K9GASMiIpHQHIyIiERCASMiIpEoi7sAkWJlZv0Ei/Uu1QV8zN1fDV/zh8A/AC8B9wDHgC3u/ue5rFXkRqgHIxKfk+7ee+kH8H2CVeKYWRXBBRQvA5sIdg44AnwypnpFrot6MCLxqQ8vdb1UF/D74ePPAdvdfSa8RPq/u/uUmQ2Y2WZ3/0EOaxW5bgoYkfgMu/tHLm0ws78M/10G/CbwmJltAdLu/lr4st8H/tHMPu7uozmsV+S6aIhMJD41V3nuHuB/EOx59odArZmdDns8u4CzwH+MvEKRWdA6GJGYmNkxoP/Zg42vAAAA1UlEQVSy5puBze5+yMzuJtia5OvAJPDP7v6gmX0R2H3Jzs4i85KGyERiYGbtwMvu/hOXtf/l5a919/Nmtp5gaxYItmk5H3mRIrOkITKReDxMcPnx5coItsCH4OezJNxk8/cJ9j6D4F40Rbctj+Qf9WBEcizsvXwM+N1L2iqB58JPL66NqQQqgD8Gvunub4U9nCZgb84KFrlBmoMRiYGZlbv71GVtJe6e/oDXmusHVfKQAkZERCKhORgREYmEAkZERCKhgBERkUgoYEREJBIKGBERicT/B0xul51iF5H7AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#print(td,tz,tc)\n",
    "y=( -(贷款本金/ld)*(1+利率)*T贷款-房租*T租房+出租*T出租)\n",
    "\n",
    "plt.xlabel(\"月份\")\n",
    "plt.ylabel(\"收益\")\n",
    "plt.plot(x,y)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0. 0. 0. 0. 0. 5. 6. 7. 8. 9.]\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1de5d7157f0>]"
      ]
     },
     "execution_count": 146,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAF95JREFUeJzt3Xl0lfWdx/H3LwkBEsKaBGQJYScgq1EUXKaAtlqp65nqtLXVcWhnOq1OZyq4jU5rrbWOteOx7WCt045OnSnBvVaSw9LWKgqKCdwQxLAEQm5iMIskIdt3/khQUCQXuDfPfe7zeZ3jOYA34XMu8DlPnjzP53FmhoiI+EeS1wFEROTEqLhFRHxGxS0i4jMqbhERn1Fxi4j4jIpbRMRnVNwiIj6j4hYR8RkVt4iIz6TE4pNmZmZabm5uLD61iEhC2rRp03tmlhXJa2NS3Lm5uWzcuDEWn1pEJCE553ZH+lqdKhER8RkVt4iIz6i4RUR8RsUtIuIzKm4REZ9RcYuI+IyKW0TEZ1TcIiJR8MauA/xi/bu98nvF5AYcEZGg+OBQO/f/YRu/eXU3OUPTuO6csaSlxrZaVdwiIidpXVk1tz+9hcr6Zq5fkMu/XDQl5qUNKm4RkRP2/sFWvv9iiFVv7mNi9gBWfmM+Z4wd0mu/v4pbRCRCZsZLW6r412e3UNfUxrcWTuQfF06kb0pyr+ZQcYuIRKC6oYU7n93Cy1vDzBg1i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AAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x=np.arange(0,10,1) #月每月计算\n",
    "y=x \n",
    "z=x*np.append(np.zeros(5),np.ones(5))\n",
    "print(z)\n",
    "plt.plot(x,z)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0., 0., 0., 1., 1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0.])"
      ]
     },
     "execution_count": 127,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "aa=np.ones(5)\n",
    "bb=np.pad(aa,(0,4),mode=\"constant\")\n",
    "np.pad(bb,(3,3),\"constant\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
